<?php
/**
 * View parcial para campo form admin
 * @param campo
 * @param cabecalho
 * @param valor
 * @param required
 */
$campo = $this->campo;
$cabecalho = $this->cabecalho;
$data = new Zend_Date($this->valor);
$valor = $data->toString(Zend_Date::DATES);
// adiciona css e js dependentes
$this->headLink()->appendStylesheet($this->baseUrl('_css/jquery-ui.css'));
$this->headScript()->appendFile($this->baseUrl('_js/jquery.maskedinput-1.2.2.min.js'));
$this->headScript()->appendFile($this->baseUrl('_js/calendario/jquery-ui-1.7.2.custom.min.js'));
$this->headScript()->appendFile($this->baseUrl('_js/calendario/datepicker-pt-BR.js'));

if (!$this->layout()->isEnabled()) {
	echo $this->headLink();
	echo $this->headScript();
}
?>
<script type="text/javascript">
$(function() {
	$('#<?php echo $campo;?>').mask('99/99/9999').datepicker();
});
</script>
<label for="<?php echo $campo; ?>"><?php echo $cabecalho; ?></label>
<input class="text-input small-input {validate: {required: <?php echo (isset($this->required) && $this->required == false) ? 'false' : 'true'; ?>}}" type="text" id="<?php echo $campo; ?>" name="<?php echo $campo; ?>" value="<?php echo $valor; ?>" />
